package nz.ac.massey.jbuif.events;

import java.util.EventObject;


/**
 * Class ObjectLoadedEvent
 * @author AMIR H KIOUMARS
 *
 */
public class ObjectLoadedEvent extends EventObject {
	
	private static final long serialVersionUID = -1324371598268752828L;
	
	private Object _obj;
	private boolean _isHistFlag = false;
	
	
	/**
	 * ObjectLoadedEvent constructor
	 * @param source object source
	 * @param obj an object
	 */
	public ObjectLoadedEvent(Object source, Object obj) {
		super(source);
		_obj = obj;
	}
	
	
	/**
	 * ObjectLoadedEvent controls the object loaded event
	 * @param source object source
	 * @param obj an object
	 * @param isHistoryFlag boolean history flag
	 */
	public ObjectLoadedEvent(Object source, Object obj, boolean isHistoryFlag) {
		super(source);
		_obj = obj;
		_isHistFlag = isHistoryFlag;
	}
	
	
	/**
	 * getObjectLoaded get the loaded object
	 * @return an object
	 */
	public Object getObjectLoaded() {
		return _obj;
	}

	
	/**
	 * getHistoryFlag get the history flag
	 * @return boolean flag
	 */
	public boolean getHistoryFlag() {
		return _isHistFlag;
	}
}
